package com.wan.data.mysql.orm.meta;

import java.util.ArrayList;
import java.util.List;

public class IndexMeta{
    /** 索引名 */
    private final String name;
    /** 索引类型 */
    private final String type;
    /** 字段meta */
    private final List<ColumnMeta> columnMetas;
    /** 字段名 */
    private List<String> columns;

    public IndexMeta(String name, String type) {
        this.name = name;
        this.type = type;
        this.columnMetas = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public String getType() {
        return type;
    }

    public List<ColumnMeta> getColumnMetas() {
        return columnMetas;
    }

    public void addColumnMeta(ColumnMeta columnMeta){
        this.columnMetas.add(columnMeta);
    }

    public List<String> getColumns() {
        return columns;
    }

    public void setColumns(List<String> columns) {
        this.columns = columns;
    }
}
